@extends('layouts.app')

@section('content')
<!-- Main content -->
<section class="content">
  <div class="row">
    <div class="col-xs-12">
      @include('layouts.utils.success')
      <div class="box">
        <div class="box-header">
          分享总数：{{ $tweets->total() }}
        </div>
        <!-- /.box-header -->
        <div class="box-body table-responsive no-padding">
          <table class="table table-hover">
            <tr>
              <th style="width: 50px;">ID</th>
              <th>用户</th>
              <th>来源</th>
              <th>描述</th>
              <th>发布日期</th>
              <th style="width: 50px;">操作</th>
            </tr>
            @forelse($tweets as $tweet)
            <tr>
              <td>{{ $tweet->id }}</td>
              <td>{{ $tweet->user_id }}</td>
              <td>{{ $tweet->source }}</td>
              <td>{{ $tweet->detail }}</td>
              <td>{{ $tweet->created_at }}</td>
              <td>
                <a style="cursor: pointer;">查看</a>
                <a style="cursor: pointer;">删除</a>
              </td>
            </tr>
            @empty
              <tr>
                <td colspan="6" class="text-center">暂无数据</td>
              </tr>
            @endforelse
          </table>
        </div>
        <div class="box-footer">
          {!! $tweets->links() !!}
        </div>
        <!-- /.box-body -->
      </div>
      <!-- /.box -->
    </div>
  </div>
</section>
<!-- /.content -->
@endsection
